home *** CD-ROM | disk | FTP | other *** search
/ Developer CD Series 1994 November: Tool Chest / Dev.CD Nov 94.toast / Sample Code / Snippets / Toolbox / Notification Hacks / GestaltTalk / GestaltTalkSelector.c < prev   
Encoding:
Text File  |  1992-09-04  |  531 b   |  26 lines  |  [TEXT/KAHL]

  1. /*
  2.  
  3.     GestaltTalkSelector.c
  4.     ---------------------
  5.     
  6.     This selector returns the address to GestaltTalk globals,
  7.     which includes a pointer to the data buffer.
  8.     
  9. */
  10.  
  11. pascal OSErr GestaltTalkGestalt(long selector, long *response)
  12. {
  13.     
  14.     asm {
  15.             bsr.s     @skipStorage        ; skip over the data and push address
  16.             dc.l    0x00                ; this is the gestaltTalk globals record
  17.             dc.l    0x00                ;
  18.             dc.l    0x00
  19.             dc.l    0x00
  20.             dc.l    0x00
  21.         @skipStorage:
  22.             movea.l    response,a0
  23.             move.l    (sp)+,(a0)            ; put the address of data into response
  24.     }
  25.     return     0;
  26. }